package cn.dxs.viewpager_wechat_app;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class MainActivity extends AppCompatActivity implements View.OnClickListener {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Button splash = (Button) findViewById(R.id.btn_splash);
        splash.setOnClickListener(this);
        Button wechat = (Button) findViewById(R.id.btn_wechat2);
        wechat.setOnClickListener(this);
        Button wechat_tab = (Button) findViewById(R.id.btn_wechat_tab);
        wechat_tab.setOnClickListener(this);
        Button banner = (Button) findViewById(R.id.btn_banner);
        banner.setOnClickListener(this);
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.btn_splash:
                startActivity(new Intent(this, SplashActivity.class));
                break;
            case R.id.btn_wechat2:
                startActivity(new Intent(this, WechatActivity.class));
                break;
            case R.id.btn_wechat_tab:
                startActivity(new Intent(this, WechatTabActivity.class));
                break;
            case R.id.btn_banner:
                startActivity(new Intent(this, BannerActivity.class));
                break;
        }
    }
}